<!DOCTYPE html>
<html dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>">
    <head>
        <meta charset="UTF-8" />
        <title><?php echo $title; ?></title>
        <base href="<?php echo $base; ?>" />
        <?php if ($description) { ?>
        <meta name="description" content="<?php echo $description; ?>" />
        <?php } ?>
        <?php if ($keywords) { ?>
        <meta name="keywords" content="<?php echo $keywords; ?>" />
        <?php } ?>
        <?php if ($icon) { ?>
        <link href="<?php echo $icon; ?>" rel="icon" />
        <?php } ?>
        <?php foreach ($links as $link) { ?>
        <link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
        <?php } ?>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/cardonline/stylesheet/stylesheet.css" />
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/cardonline/css/style.css" />

        <?php foreach ($styles as $style) { ?>
        <link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
        <?php } ?>
        <script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
        <link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
        <script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
        <script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
        <link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
        <script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
        <script type="text/javascript" src="catalog/view/javascript/common.js"></script>
        <?php foreach ($scripts as $script) { ?>
        <script type="text/javascript" src="<?php echo $script; ?>"></script>
        <?php } ?>
        <!--[if IE 7]>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
        <![endif]-->
        <!--[if lt IE 7]>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
        <script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
        <script type="text/javascript">
        DD_belatedPNG.fix('#logo img');
        </script>
        <![endif]-->
        <?php echo $google_analytics; ?>
        <script type="text/javascript">
            jQuery(document).ready(function(){
                jQuery('.catbacs').click(function(){
                    $id = jQuery(this).attr('attr'); 
                        jQuery('.catbacs').each(function(){
                        jQuery('#' + jQuery(this).attr('attr') + '_xxx').hide(); 
                    });
                    jQuery('#' + $id + '_xxx').show();
                });
            });
        </script>
    </head>
    <body>

        <div id="tophead">
            <div class="main">
                <div class="hotline">
                    <ul>
                        <li>Hỗ Trợ Khách Hàng <span>từ 6:00 đến 24:00</span></li>
                        <li class="phone-number">(08) 3 941 3424</li>
                    </ul>
                </div>
                <div class="nav">      
                    <div id="welcome">
                        <?php if (!$logged) { ?>
                        <?php echo $text_welcome; ?>
                        <?php } else { ?>
                        <?php echo $text_logged; ?>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </div>

        <div id="header">
            <div class="main">
                <div class="tabs-header-inner">
                    <ul>
                        <li> 
                            <a class="nhommua active" href="http://beta2.nhommua.com/">
                                <i></i></a>
                        </li>
                        <li>
                            <a class="zap" href="http://www.zap.vn/">
                                <i></i></a></li>
                        <li>
                            <a class="kay" href="http://www.kay.vn/">
                                <i></i></a></li>
                        <li><a href="http://www.hungry.vn/" class="hungry"><i></i></a></li>
                    </ul>

                    <div class="nav">      
                        <h3>
                            <b style="
                               color: #EB6E1C;
                               ">HOTLINE : </b> (08) 3 941 3424- (08) 3 941 3424-
                        </h3>

                    </div>

                </div><div class="main-inner"> 
                    <h1 class="logo"><a href="#"></a></h1>
                    <div class="delivery-process">
                        <ul><li><a href="#"><img alt="#" src="catalog/view/theme/cardonline/images/trahang.png"></a>
                                <p>TRẢ HÀNG TRONG 14 NGÀY</p>
                            </li>
                            <li><a href="#"><img alt="#" src="catalog/view/theme/cardonline/images/giao_hang.jpg"></a>
                                <p>GIAO HÀNG MIỄN PHÍ TOÀN QUỐC (*)</p>
                            </li>
                            <li><a href="#"><img alt="#" src="catalog/view/theme/cardonline/images/thanhtoan.jpg"></a>
                                <p>THANH TOÁN KHI NHẬN HÀNG</p>
                            </li>
                        </ul>
                    </div>
                </div>

                <div class="maque"> 
                    <marquee behavior="scroll" direction="left">Your scrolling text goes here</marquee>

                </div>


            </div>
        </div>

        <div id="notification"></div>
        <div id="container">

            <div class="main">


                <div class="f_left"> 

                    <div id="nav-menu">

                        <ul>
                            <li class="home"><a href="#" style="padding: 0;"><img src="catalog/view/theme/cardonline/images/icon_home.png" alt=""></a></li>
                            <?php foreach ($categories as $category) { ?>
                            <li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
                                <?php if ($category['children']) { ?>
                                <div>
                                    <?php for ($i = 0; $i < count($category['children']);) { ?>
                                    <ul>
                                        <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
                                        <?php for (; $i < $j; $i++) { ?>
                                        <?php if (isset($category['children'][$i])) { ?>
                                        <li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
                                        <?php } ?>
                                        <?php } ?>
                                    </ul>
                                    <?php } ?>
                                </div>
                                <?php } ?>
                            </li>
                            <?php } ?>
                        </ul>
                    </div>
                </div>
                <div class="nav-2"></div> 
